---
title: 'Slack Integration for Cypress | Cypress Documentation'
description: 'Setup Slack notifications on failed runs, passed runs, and flaky tests for your Cypress Cloud organization and projects.'
sidebar_position: 40
sidebar_label: Slack
---

<ProductHeading product="cloud" />

# Slack Integration

:::info

##### <Icon name="question-circle" color="#4BBFD2" /> What you'll learn

- How to install the Cypress integration for Slack
- How to configure Slack notifications on failed runs, passed runs, and flaky tests
- How to manage Slack notifications at the organization and project level

:::

Cypress's Slack integration provides real-time results for your Cypress tests, all in one place - improving remote
collaboration and giving wider visibility into test failures and flake, [UI Coverage](/ui-coverage/get-started/introduction),
and [Cypress Accessibility](/accessibility/get-started/introduction) results.

The Cypress integration for Slack allows you to:

- Improve cross-team collaboration by instantly surfacing Cypress results to the teams that need visibility
- Confirm that key tests pass prior to launching new products or features
- Reduce the time it takes to catch failed tests

<DocsVideo
  src="https://www.youtube.com/embed/hnDPz7dognY?si=PRRy4f5n6f1jzfVJ"
  title="Cypress app for Slack"
/>

## Getting Started

**You need three things to get started:**

- A Cypress Cloud account
- The ability to configure Cypress Cloud integrations - you must be an **admin** or the **owner** of your Cypress Cloud organization.
- The ability to authorize Slack apps - by default, Slack allows **any workspace member** to authorize apps,
  however workspace owners may require app approvals before installation. See this [Slack help article](https://slack.com/help/articles/202035138-Add-apps-to-your-Slack-workspace) for more details.

## Install the Cypress app for Slack

1. In the Cypress Cloud, visit the **Integrations** page for the organization you wish to integrate with Slack.
2. Click the **Enable** button in the **Slack** section.
3. A popup window will be displayed requesting permission for Cypress to access the
   workspace.
4. After you approve the app permissions, you can choose your Slack **workspace** and **channel** to
   associate with the installation.

Now Cypress will post run results for all projects in your organization to the specified Slack channel.

## Slack configuration

The Slack messages can be tailored to match your teams' needs. A few options include:

- Sending results to one or more public or private Slack channels or directly to a specific user.
- Set notification preferences for when and where run results should be posted.
- Configure at the organization-level and/or project-level to support multiple teams working on separate projects.

### Per-Organization vs per-project configuration

The following describes where to go to configure Slack for an organization and a project.

#### Organization settings

Configure Slack for the organization:

1. Navigate to the **Integrations** page for the organization you wish to configure.
2. Within the **Slack** integration, click **Configure**.
3. Configure the app.

#### Project settings

Configurate Slack for a project:

1. Navigate to the **Project Settings** page for the project you wish to configure.
2. Click on the **Integrations** tab within the **Project Settings** page.
3. Configure the app with the **Slack Integration** section.

### Slack channels

You can have Cypress Cloud post run results to specific channels. To add a
channel:

1. Navigate to the **Slack** configuration page.
2. Click **Add Slack Channel**.
3. You'll see a popup window that allows you to choose the channel or individual to associate with the organization.
4. Search for and selecting the channel messages should post to.

Cypress Cloud will begin to post run results to the channel.

### Direct messages

You can have Cypress Cloud post run results as a direct message to a single user. To post to a direct message:

1. Navigate to the **Slack** configuration page
2. Click **Add Slack Channel**.
3. You'll see a popup window that allows you to choose the channel or individual to associate
   with the organization.
4. Search for and select the user that messages should be sent to.

Cypress Cloud will begin to send run results to this user.

## Notification preferences

By default, Cypress Cloud will post a Slack message to each configured channel
only for failing runs. However, you can select any combination of the followings preferences:

- **Failed runs**: will notify on runs with a _failed_ status.
- **Passed runs**: will notify on runs with a _passed_ status.
- **Flaky tests**: will notify on runs that have an identified _flaky_ test.

To set notification preferences:

1. Navigate to Slack configuration page
2. Select the notification preferences for each channel

### Filter notifications by tag or run group

When configuring at the project-level, you can filter notifications posted to Slack based on a
[tag](/app/references/command-line#cypress-run-tag-lt-tag-gt) or
[group](/app/references/command-line#cypress-run-group-lt-name-gt) the run was
recorded with. This can be helpful to only post notifications on certain runs,
like those to a staging or release environment.

1. Navigate to the **Slack** configuration page
2. Under **Tags**, select the **Tag** dropdown for the desired integration and
   select which tag(s) to filter. If more than one tag is selected the Slack message will be sent
   if any of the tags were associated with the run.
3. Under **Run Groups**, select the **Run Group** dropdown for the desired integration and
   select which run group(s) to filter. If more than one run group is selected the Slack message will be
   sent if any of the run groups were associated with the run.

If both a tag and run group are selected, only a run associated with both criteria will
trigger a message to be sent to Slack.

### Mute a channel

If you want Cypress Cloud to temporarily stop posting Slack messages to a
certain channel, you can **Mute** that channel. This allows you to easily pause
and resume notifications for a specific channel without losing the configuration
you've put in place.

1. Navigate to the **Slack** configuration page
2. Toggle the **Active** selector for each Slack channel you want muted.

### Remove a Slack channel

You can have Cypress Cloud stop posting notifications to a channel. You can
remove all Slack channels if you'd prefer to disable global notifications
altogether in favor of per-project notifications.

1. Navigate to the **Slack** configuration page
2. Under **Actions**, select **Delete** for each Slack channel you want
   deleted.

## Remove the integration

You can completely remove the Cypress integration for Slack from your workspace.
This will remove the `@cypress` bot from your workspace and will delete all of the
Slack configurations you've set in Cypress Cloud. **You cannot undo this**, but you
will be able to install the Cypress integration for Slack again in the future.

1. Navigate to the **Integrations** page for the organization with the installed
   integration.
2. Within the **Slack Integration**, click **Configure**.
3. Click **Uninstall Slack Integration** to uninstall the Cypress integration
   for Slack.

## Security and compliance

Review our [Privacy Policy](https://on.cypress.io/privacy-policy) for information about how the Cypress app for Slack collects and
manages your information.

### Authorizations

When authorized, Cypress can:

- View information about a user's identity
- Post messages to specific channels in Slack & direct message conversations
- Show previews of cloud.cypress.io URLs in messages
- View URLs from cloud.cypress.io

### App scopes

- User token scopes: [`links:read`](https://api.slack.com/scopes/links:read), [`links:write`](https://api.slack.com/scopes/links:write)
- Bot token scopes: [`chat:write`](https://api.slack.com/scopes/chat:write), [`incoming-webhook`](https://api.slack.com/scopes/incoming-webhook), [`links:read`](https://api.slack.com/scopes/links:read), [`links:write`](https://api.slack.com/scopes/links:write)
